var mongoose = require('./db')
const { Schema } = require('mongoose');

var TaskJoinSchema = mongoose.Schema({
    openId: String,     //任务参与者关联ID
    taskId: Schema.Types.ObjectId,     //任务关联ID
    completeNum: {   //任务完成步骤
        type: Number,
        default: 0
    },
    completeSum: {
        type:Number
    },
    completeFlag: {
        type:Number,
        default: 0
    },
    joinTime: String    //开始任务时间
})

var TaskJoin = mongoose.model('TaskJoin', TaskJoinSchema, 'TaskJoin')

module.exports = TaskJoin